﻿using System;

namespace XUtliPoolLib
{
	// Token: 0x02000220 RID: 544
	public class MilitaryRankByExploit : CVSReader
	{
		// Token: 0x06000C33 RID: 3123 RVA: 0x00040124 File Offset: 0x0003E324
		public MilitaryRankByExploit.RowData GetByMilitaryRank(uint key)
		{
			bool flag = this.Table == null || this.Table.Length == 0;
			MilitaryRankByExploit.RowData result;
			if (flag)
			{
				result = null;
			}
			else
			{
				for (int i = 0; i < this.Table.Length; i++)
				{
					bool flag2 = this.Table[i].MilitaryRank == key;
					if (flag2)
					{
						return this.Table[i];
					}
				}
				result = null;
			}
			return result;
		}

		// Token: 0x06000C34 RID: 3124 RVA: 0x00040190 File Offset: 0x0003E390
		protected override void ReadLine(XBinaryReader reader)
		{
			MilitaryRankByExploit.RowData rowData = new MilitaryRankByExploit.RowData();
			base.Read<uint>(reader, ref rowData.MilitaryRank, CVSReader.uintParse);
			this.columnno = 0;
			base.Read<string>(reader, ref rowData.Name, CVSReader.stringParse);
			this.columnno = 1;
			rowData.MilitaryExploit.Read(reader, this.m_DataHandler);
			this.columnno = 2;
			rowData.Reward.Read(reader, this.m_DataHandler);
			this.columnno = 3;
			base.Read<string>(reader, ref rowData.Icon, CVSReader.stringParse);
			this.columnno = 4;
			base.Read<string>(reader, ref rowData.ShowRange, CVSReader.stringParse);
			this.columnno = 5;
			base.Read<string>(reader, ref rowData.RewardTips, CVSReader.stringParse);
			this.columnno = 6;
			this.Table[this.lineno] = rowData;
			this.columnno = -1;
		}

		// Token: 0x06000C35 RID: 3125 RVA: 0x00040270 File Offset: 0x0003E470
		protected override void OnClear(int lineCount)
		{
			bool flag = lineCount > 0;
			if (flag)
			{
				this.Table = new MilitaryRankByExploit.RowData[lineCount];
			}
			else
			{
				this.Table = null;
			}
		}

		// Token: 0x0400076E RID: 1902
		public MilitaryRankByExploit.RowData[] Table = null;

		// Token: 0x020003AF RID: 943
		public class RowData
		{
			// Token: 0x0400107E RID: 4222
			public uint MilitaryRank;

			// Token: 0x0400107F RID: 4223
			public string Name;

			// Token: 0x04001080 RID: 4224
			public SeqRef<uint> MilitaryExploit;

			// Token: 0x04001081 RID: 4225
			public SeqListRef<uint> Reward;

			// Token: 0x04001082 RID: 4226
			public string Icon;

			// Token: 0x04001083 RID: 4227
			public string ShowRange;

			// Token: 0x04001084 RID: 4228
			public string RewardTips;
		}
	}
}
